x86emul: correct PUSHF/POPF
authorJan Beulich <jbeulich@suse.com>
Wed, 7 Dec 2016 12:55:42 +0000 (13:55 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 7 Dec 2016 12:55:42 +0000 (13:55 +0100)
commite5c1b8145bccb7fc587ee5b0c95ace6c5e0c7ffd
tree5fa67d1dff1e23c29de0f1070df2c8cfbe043915
parent3eabc1c2e240bcb9637153714ed20db30613ed85
x86emul: correct PUSHF/POPF

Both need to raise #GP(0) when in VM86 mode with IOPL < 3.

Additionally PUSHF is documented to clear VM and RF from the value
placed onto the stack.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c